package com.kabu.aqs;

import java.util.concurrent.Semaphore;

/**
 * @author jiawuwei
 * @Copyright: Copyright (c) 兆日科技股份有限公司  2020
 * @date 2020/8/3,13:54
 */
public class SemaphoreTest {
    Semaphore semaphore = new Semaphore(5);
    public String test(){
        try {
            semaphore.acquire();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }finally {
            semaphore.release();
        }
        return "";
    }
}
